<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
  var num = 10;
  if(true){
    let num = 20;
    console.log(num); // => 20
  }
</script>
</body>
</html>